﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HuntWump2
{
    class gwee
    {
        //changes variables that affect the game state, as given by the game engine
        public static String[] doornames = { "Go This Way", "Go Over Here", "Open ME", "Come Here", "Why not?", "Go Wild", "Please Open", "Riches Await", "Wumpus?", "No Danger Here", "Welcome!", "Escape!", "Door", "Do Not Open", "DANGER", "Good Move"};
        public static int[] doorshow = { 0, 0, 0, 0, 0, 0 };
        public static int turns = 0;
        public static int arrows = 0;
        public static int coins = 0;
        public static int room = 0;
        public static int[] hazardz = { 0, 0, 0 };
       
        public static void hideButtons(Form1 form)
        {
            form.button1.Hide();
            form.button2.Hide();
            form.button3.Hide();
            form.button4.Hide();
            form.button5.Hide();
            form.button6.Hide();
        }
        public static void doorz(int[] doors)
        {
           //doors takes an integer array of which sides of the room contain doors, for example [1, 4, 5] would mean to display doors on those sides of the hexagonal cave.
            //clears the array
            for (int i = 0; i < doorshow.Length; i++)
            {
                doorshow[i] = 0;
            }
            //sets the new array
            for (int i = 0; i < doors.Length; i++)
            {
                doorshow[doors[i]] = 1;
            }
        }
        public static void updatestats(int trns, int ar, int cns, int rm)
        {
            turns = trns;
            arrows = ar;
            coins = cns;
            room = rm;
            if (rm == 0)
            { room = 30; }
        }
        public static void updatehazards(int[] hazards)
        {
            //hazards takes an integer array of length three, corresponding to if there is a bat in the room, a pit, or the wumpus. a zero indicates no presence, 
            //a 1 indicates a hazard in an adjacent room and will display the corresponding hint, and a 2 indicates that the hazard is in the room!
            for (int i = 0; i < hazards.Length; i++)
            {
                hazardz[i] = hazards[i];
            }            
        }
        public static String chooseStatement(int seed)
        {
            Random random = new Random();
            String[] names = { doornames[random.Next(doornames.GetLength(0))], doornames[random.Next(doornames.GetLength(0))], doornames[random.Next(doornames.GetLength(0))], doornames[random.Next(doornames.GetLength(0))], doornames[random.Next(doornames.GetLength(0))], doornames[random.Next(doornames.GetLength(0))] };
            return names[seed];
        }        
    }
}
